cmake_minimum_required(VERSION 3.11)

# 项目名称
project(Game)

# 同时支持C和C++编译
enable_language(C CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_C_STANDARD 99)

# 引擎
file(GLOB ENGINE_SRC_FILES "engine/src/*.c")

add_subdirectory(libs/raylib)

# src下的c源文件
file(GLOB_RECURSE SOURCES_C src/*.c)


# 你的可执行文件
add_executable(Game ${SOURCES_C} ${ENGINE_SRC_FILES})

file(COPY res/ DESTINATION ${PROJECT_BINARY_DIR}/res)

# 链接 Raylib
target_link_libraries(Game PRIVATE raylib)
